package com.zfl.pojo;

import com.zfl.anno.State;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import lombok.Data;
import org.hibernate.validator.constraints.URL;

@Data
public class Article {

    private Integer id;
    @NotEmpty
    @Pattern(regexp = "^\\S{1,10}$")
    private String title;
    @NotEmpty
    private String content;//文章内容
    @NotEmpty
    @URL
    private String coverImg;
    @State
    private String state;//发布状态 已发布/草稿
    @NotNull
    private Integer categoryId;//文章分类Id
    private Integer createUser;
    private Long createTime;
    private Long updateTime;

}
